package com.guochen.debt.mapper;


import com.guochen.debt.pojo.ReceivedLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Guo Chen
 * @date 2022年05月14日 15:21
 */
public interface ReceivedLogMapper {
    //TODO
    //1.修改
    //2.删除
    //3.添加
    //4.查询

    /**
     * 新增提款信息
     */
    Integer insertReceivedLog(ReceivedLog receivedLog);

    /**
     * 根据id删除提款信息
     */
    Integer deleteReceivedLogById(@Param("id") Integer id);

    /**
     * 修改提款信息
     */
    Integer updateReceivedLog(ReceivedLog receivedLog);

    /**
     * 查询全部提款信息
     */
    List<ReceivedLog> getAllReceivedLog();

    /**
     * 根据提款信息id查询
     */
    List<ReceivedLog> getReceivedLogById(@Param("id") Integer id);

    /**
     *根据贷款id查询
     */
    List<ReceivedLog> getReceivedLogByDebtId(@Param("id") Integer id);
    /**
     *根据贷款amount查询
     */
    List<ReceivedLog> getReceivedLogByAmountWithinARange(@Param("min") double min,@Param("max") double max);
    /**
     *根据贷款username查询
     */
    List<ReceivedLog> getReceivedLogByUsername(@Param("username") String username);
    /**
     *根据贷款状态查询
     */
    List<ReceivedLog> getReceivedLogByStatus(@Param("status") int status );
}

